#include <iostream>
#include <memory>
class Test
{
public:
    Test() {}
    Test(const Test &t) = delete;           /*将拷贝构造删除*/
    void operator=(const Test &t) = delete; /*将赋值运算符重载删除*/

private:
    int *a;
};
int main()
{
    Test t;
    // Test t1 = t; /*拷贝构造被删除*/

    // t2 = t; /*删除赋值运算符重载*/

    std::unique_ptr<int> ptr(new int(10));
    /*独占指针不允许赋值运算符重载和拷贝构造*/
    // std::unique_ptr<int> ppp = ptr;
    std::cout << *ptr << std::endl;

    return 0;
}